/*
 * cross_serial_port.cpp
 *
 *  Created on: 2010-3-27
 *      Author: Administrator
 */

#include "cross_serial_port.h"

CrossPlatformSerial::CrossPlatformSerial(){}
CrossPlatformSerial::~CrossPlatformSerial(){}
bool CrossPlatformSerial::exist(char *portName)
{
#if (SERIAL_PORT_TYPE == SERIAL_PORT_WINDOWS)
	return WindowsSerialPort::exist(portName);
#else
#endif
}
bool CrossPlatformSerial::open(char* portName)
{
	return this->serialPort.open(portName);
}

bool CrossPlatformSerial::close()
{
	return this->serialPort.close();
}

bool CrossPlatformSerial::setSettings(int speed, int wordSize, int stopBits, char parity)
{
	return this->serialPort.setSettings(speed, wordSize, stopBits, parity);
}

bool CrossPlatformSerial::setTimeouts(int readTimeout, int writeTimeout)
{
	return this->serialPort.setTimeouts(readTimeout, writeTimeout);
}

int CrossPlatformSerial::readBuf(char * buf, int bufSize)
{
	return this->serialPort.readBuf(buf, bufSize);
}

int CrossPlatformSerial::writeBuf(char * buf, int bufSize)
{
	return this->serialPort.writeBuf(buf, bufSize);
}
